<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
        .string { color: green; }
        .number { color: darkorange; }
        .boolean { color: blue; }
        .null { color: magenta; }
        .key { color: red; }
    </style>


    <script src="jquery-3.2.1.min.js"></script>
    <script>
        function syntaxHighlight(json) {
            if (typeof json != 'string') {
                json = JSON.stringify(json, undefined, 2);
            }
            json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
            return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function(match) {
                var cls = 'number';
                if (/^"/.test(match)) {
                    if (/:$/.test(match)) {
                        cls = 'key';
                    } else {
                        cls = 'string';
                    }
                } else if (/true|false/.test(match)) {
                    cls = 'boolean';
                } else if (/null/.test(match)) {
                    cls = 'null';
                }
                return '<span class="' + cls + '">' + match + '</span>';
            });
        }

        $(function () {
            $.ajax({
                type:"POST",
                url:"http://jiai.tpddns.cn/api/v1/user/fortest",
                //"http://localhost:8777/api/v1/twxshop/findById",
                //"http://localhost:8777/api/v1/twxshop/reg",
                //"http://localhost:8777/api/v1/twxuser/getNearShops",
                dataType:'jsonp',
				xhrFields: {  
					withCredentials: true  
					}, 
                async:true,
                headers:{shopid:125},
                success:function (json) {
                    $('#result').html(syntaxHighlight(json));
                }
            });
        });
    </script>
</head>
<img>

<pre id="result">

</pre>
<script>


</script>
</body>
</html>